package com.ruoyi.project.module.productsUpload.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.module.productsUpload.mapper.ProductsUploadMapper;
import com.ruoyi.project.module.productsUpload.domain.ProductsUpload;
import com.ruoyi.project.module.productsUpload.service.IProductsUploadService;
import com.ruoyi.common.support.Convert;

/**
 * 商品批量上传 服务层实现
 * 
 * @author lcx
 * @date 2018-08-25
 */
@Service
public class ProductsUploadServiceImpl implements IProductsUploadService 
{
	@Autowired
	private ProductsUploadMapper productsUploadMapper;

	/**
     * 查询商品批量上传信息
     * 
     * @param id 商品批量上传ID
     * @return 商品批量上传信息
     */
    @Override
	public ProductsUpload selectProductsUploadById(Integer id)
	{
	    return productsUploadMapper.selectProductsUploadById(id);
	}
	
	/**
     * 查询商品批量上传列表
     * 
     * @param productsUpload 商品批量上传信息
     * @return 商品批量上传集合
     */
	@Override
	public List<ProductsUpload> selectProductsUploadList(ProductsUpload productsUpload)
	{
	    return productsUploadMapper.selectProductsUploadList(productsUpload);
	}
	
    /**
     * 新增商品批量上传
     * 
     * @param productsUpload 商品批量上传信息
     * @return 结果
     */
	@Override
	public int insertProductsUpload(ProductsUpload productsUpload)
	{
	    return productsUploadMapper.insertProductsUpload(productsUpload);
	}
	
	/**
     * 修改商品批量上传
     * 
     * @param productsUpload 商品批量上传信息
     * @return 结果
     */
	@Override
	public int updateProductsUpload(ProductsUpload productsUpload)
	{
	    return productsUploadMapper.updateProductsUpload(productsUpload);
	}

	/**
     * 删除商品批量上传对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteProductsUploadByIds(String ids)
	{
		return productsUploadMapper.deleteProductsUploadByIds(Convert.toStrArray(ids));
	}
	
}
